#pragma once
#include "Station.h"
#include "constant.h"


class RailwayStation :
	public Station
{
private:
	int finalLeaveTime ;

	int IntoAvailTime() { return finalLeaveTime + TRAIN_INTO_DELAY; }
	int OutOfAvailTime() { return finalLeaveTime + TRAIN_OUTOF_DELAY; }

	int intoDelaySum;
	void addIntoDelay(int val) { intoDelaySum += val; }
	int outofDelaySum;
	void addOutofDelay(int val) { outofDelaySum += val; }
public:
	void EnterStation(Transport* transport) ;
	void UnloadAndLoad(Transport* transport) ;
	void Leave(Transport* transport) ;
	bool isAdditionalLoad() { return true; }
	void AdditionalLoad(Transport* transport);

	void printResult(ostream &out);

	RailwayStation(void);
	~RailwayStation(void);
};
